﻿namespace NMortgage.UI.ViewModels
{
    using System.Collections.ObjectModel;

    using Caliburn.Micro;

    using NMortgage.UI.Events;
    using NMortgage.UI.Model;

    public sealed class ExtraPaymentListViewModel : ABaseItemListViewModel<ExtraPaymentCollection,ExtraPayment>
    {
        #region Constructors

        public ExtraPaymentListViewModel(IEventAggregator eventAggregator)
            :base(eventAggregator)
        {
            ItemCollection = new ExtraPaymentCollection();
        }

        #endregion Constructors

        #region Properties

        public override string Title
        {
            get
            {
                return Properties.Resources.ExtraPaymentTitle;
            }
        }

        #endregion Properties

        #region Methods

        public override void Add()
        {
            ItemDialog = new ExtraPaymentViewModel(EventAggregator);
        }

        public override void Edit(ExtraPayment item)
        {
            ItemDialog = new ExtraPaymentViewModel(EventAggregator, item);
        }

        #endregion Methods
    }
}